﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Server.Model;
using System.Runtime.Serialization;

namespace Server.Service.Model
{
    [DataContract]
    public class WCFStation
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string StreetAddress { get; set; }
        [DataMember]
        public string ZipCode { get; set; }
        [DataMember]
        public string City { get; set; }
        [DataMember]
        public double Longitude { get; set; }
        [DataMember]
        public double Latitude { get; set; }
        [DataMember]
        public double Distance { get; set; }

        public WCFStation()
        {
            Id = 0;
            Name = "";
            StreetAddress = "";
            ZipCode = "";
            City = "";
            Longitude = 0.0;
            Latitude = 0.0;
            Distance = 0;

        }

        public WCFStation(Station station)
        {
            this.Id = station.Id;
            this.Name = station.Name;
            this.StreetAddress = station.StreetAddress;
            this.ZipCode = station.ZipCode;
            this.City = station.City;
            this.Longitude = station.Longitude;
            this.Latitude = station.Latitude;
            this.Distance = station.Weight;
        }
    }
}
